package model.entity;

import java.util.List;

import model.entity.brain.Brain;
import model.entity.stats.StatSet;
import model.item.EquippedInventory;
import model.item.Inventory;
import model.map.Direction;
import model.map.Location;
import model.map.MovementType;
import utilities.*;

/**
 * 
 * This is the most basic instantiable 
 * NPC in the game.
 * 
 *
 */

public class NPC extends Entity implements Talkable, Archiveable {

	protected Brain brain;

	public NPC(String name, Direction direction, Location location, StatSet stats, 
			List<MovementType> movementTypes, Inventory inventory, 
			EquippedInventory equipment, Occupation occupation, Boolean sleeping, Brain brain){

		super(name, direction, location, stats, 
				movementTypes, inventory, 
				equipment, occupation, sleeping);

		this.brain = brain; 
	}

	public NPC() {
		// TODO Auto-generated constructor stub
	}

	public Brain getBrain() {
		return brain;
	}

	public void setBrain(Brain brain) {
		this.brain = brain;
	}

	@Override
	public List<String> getDialog() {
		// TODO Auto-generated method stub
		return null;
	}
	
	public Archive save() {
		Archive archive = super.save();
		
//		archive.putClassName("brain", this.brain.getClass().getName());
//		archive.putOneRelationship("brain", this.brain);
		
		return archive;
	}
	
	public void load(Archive archive) {
		super.load(archive);
		
//		this.brain = (Brain)ModelFactory.getInstance().createInstanceWithClassName(archive.getClassName("brain"));
//		this.brain.load(archive.getOneRelationship("brain"));
	}

}

